/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
import * as $protobuf from "protobufjs/minimal";

// Common aliases
const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

export const friend = $root.friend = (() => {

    /**
     * Namespace friend.
     * @exports friend
     * @namespace
     */
    const friend = {};

    friend.UserInfo = (function() {

        /**
         * Properties of a UserInfo.
         * @memberof friend
         * @interface IUserInfo
         * @property {number|null} [uid] UserInfo uid
         * @property {string|null} [name] UserInfo name
         * @property {number|null} [sex] UserInfo sex
         */

        /**
         * Constructs a new UserInfo.
         * @memberof friend
         * @classdesc Represents a UserInfo.
         * @implements IUserInfo
         * @constructor
         * @param {friend.IUserInfo=} [properties] Properties to set
         */
        function UserInfo(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * UserInfo uid.
         * @member {number} uid
         * @memberof friend.UserInfo
         * @instance
         */
        UserInfo.prototype.uid = 0;

        /**
         * UserInfo name.
         * @member {string} name
         * @memberof friend.UserInfo
         * @instance
         */
        UserInfo.prototype.name = "";

        /**
         * UserInfo sex.
         * @member {number} sex
         * @memberof friend.UserInfo
         * @instance
         */
        UserInfo.prototype.sex = 0;

        /**
         * Creates a new UserInfo instance using the specified properties.
         * @function create
         * @memberof friend.UserInfo
         * @static
         * @param {friend.IUserInfo=} [properties] Properties to set
         * @returns {friend.UserInfo} UserInfo instance
         */
        UserInfo.create = function create(properties) {
            return new UserInfo(properties);
        };

        /**
         * Encodes the specified UserInfo message. Does not implicitly {@link friend.UserInfo.verify|verify} messages.
         * @function encode
         * @memberof friend.UserInfo
         * @static
         * @param {friend.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
            if (message.sex != null && Object.hasOwnProperty.call(message, "sex"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.sex);
            return writer;
        };

        /**
         * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link friend.UserInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof friend.UserInfo
         * @static
         * @param {friend.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer.
         * @function decode
         * @memberof friend.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {friend.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.friend.UserInfo();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.int32();
                        break;
                    }
                case 2: {
                        message.name = reader.string();
                        break;
                    }
                case 3: {
                        message.sex = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof friend.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {friend.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserInfo message.
         * @function verify
         * @memberof friend.UserInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isInteger(message.uid))
                    return "uid: integer expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!$util.isString(message.name))
                    return "name: string expected";
            if (message.sex != null && message.hasOwnProperty("sex"))
                if (!$util.isInteger(message.sex))
                    return "sex: integer expected";
            return null;
        };

        /**
         * Creates a UserInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof friend.UserInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {friend.UserInfo} UserInfo
         */
        UserInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.friend.UserInfo)
                return object;
            let message = new $root.friend.UserInfo();
            if (object.uid != null)
                message.uid = object.uid | 0;
            if (object.name != null)
                message.name = String(object.name);
            if (object.sex != null)
                message.sex = object.sex | 0;
            return message;
        };

        /**
         * Creates a plain object from a UserInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof friend.UserInfo
         * @static
         * @param {friend.UserInfo} message UserInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        UserInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.uid = 0;
                object.name = "";
                object.sex = 0;
            }
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = message.name;
            if (message.sex != null && message.hasOwnProperty("sex"))
                object.sex = message.sex;
            return object;
        };

        /**
         * Converts this UserInfo to JSON.
         * @function toJSON
         * @memberof friend.UserInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        UserInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for UserInfo
         * @function getTypeUrl
         * @memberof friend.UserInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/friend.UserInfo";
        };

        return UserInfo;
    })();

    friend.C2S_FriendListReq = (function() {

        /**
         * Properties of a C2S_FriendListReq.
         * @memberof friend
         * @interface IC2S_FriendListReq
         * @property {number|null} [uid] C2S_FriendListReq uid
         * @property {Array.<friend.IUserInfo>|null} [list] C2S_FriendListReq list
         */

        /**
         * Constructs a new C2S_FriendListReq.
         * @memberof friend
         * @classdesc Represents a C2S_FriendListReq.
         * @implements IC2S_FriendListReq
         * @constructor
         * @param {friend.IC2S_FriendListReq=} [properties] Properties to set
         */
        function C2S_FriendListReq(properties) {
            this.list = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_FriendListReq uid.
         * @member {number} uid
         * @memberof friend.C2S_FriendListReq
         * @instance
         */
        C2S_FriendListReq.prototype.uid = 0;

        /**
         * C2S_FriendListReq list.
         * @member {Array.<friend.IUserInfo>} list
         * @memberof friend.C2S_FriendListReq
         * @instance
         */
        C2S_FriendListReq.prototype.list = $util.emptyArray;

        /**
         * Creates a new C2S_FriendListReq instance using the specified properties.
         * @function create
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {friend.IC2S_FriendListReq=} [properties] Properties to set
         * @returns {friend.C2S_FriendListReq} C2S_FriendListReq instance
         */
        C2S_FriendListReq.create = function create(properties) {
            return new C2S_FriendListReq(properties);
        };

        /**
         * Encodes the specified C2S_FriendListReq message. Does not implicitly {@link friend.C2S_FriendListReq.verify|verify} messages.
         * @function encode
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {friend.IC2S_FriendListReq} message C2S_FriendListReq message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_FriendListReq.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid);
            if (message.list != null && message.list.length)
                for (let i = 0; i < message.list.length; ++i)
                    $root.friend.UserInfo.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified C2S_FriendListReq message, length delimited. Does not implicitly {@link friend.C2S_FriendListReq.verify|verify} messages.
         * @function encodeDelimited
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {friend.IC2S_FriendListReq} message C2S_FriendListReq message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_FriendListReq.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_FriendListReq message from the specified reader or buffer.
         * @function decode
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {friend.C2S_FriendListReq} C2S_FriendListReq
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_FriendListReq.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.friend.C2S_FriendListReq();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.int32();
                        break;
                    }
                case 2: {
                        if (!(message.list && message.list.length))
                            message.list = [];
                        message.list.push($root.friend.UserInfo.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_FriendListReq message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {friend.C2S_FriendListReq} C2S_FriendListReq
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_FriendListReq.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_FriendListReq message.
         * @function verify
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_FriendListReq.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isInteger(message.uid))
                    return "uid: integer expected";
            if (message.list != null && message.hasOwnProperty("list")) {
                if (!Array.isArray(message.list))
                    return "list: array expected";
                for (let i = 0; i < message.list.length; ++i) {
                    let error = $root.friend.UserInfo.verify(message.list[i]);
                    if (error)
                        return "list." + error;
                }
            }
            return null;
        };

        /**
         * Creates a C2S_FriendListReq message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {friend.C2S_FriendListReq} C2S_FriendListReq
         */
        C2S_FriendListReq.fromObject = function fromObject(object) {
            if (object instanceof $root.friend.C2S_FriendListReq)
                return object;
            let message = new $root.friend.C2S_FriendListReq();
            if (object.uid != null)
                message.uid = object.uid | 0;
            if (object.list) {
                if (!Array.isArray(object.list))
                    throw TypeError(".friend.C2S_FriendListReq.list: array expected");
                message.list = [];
                for (let i = 0; i < object.list.length; ++i) {
                    if (typeof object.list[i] !== "object")
                        throw TypeError(".friend.C2S_FriendListReq.list: object expected");
                    message.list[i] = $root.friend.UserInfo.fromObject(object.list[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a C2S_FriendListReq message. Also converts values to other types if specified.
         * @function toObject
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {friend.C2S_FriendListReq} message C2S_FriendListReq
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_FriendListReq.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.list = [];
            if (options.defaults)
                object.uid = 0;
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.list && message.list.length) {
                object.list = [];
                for (let j = 0; j < message.list.length; ++j)
                    object.list[j] = $root.friend.UserInfo.toObject(message.list[j], options);
            }
            return object;
        };

        /**
         * Converts this C2S_FriendListReq to JSON.
         * @function toJSON
         * @memberof friend.C2S_FriendListReq
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_FriendListReq.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for C2S_FriendListReq
         * @function getTypeUrl
         * @memberof friend.C2S_FriendListReq
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        C2S_FriendListReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/friend.C2S_FriendListReq";
        };

        return C2S_FriendListReq;
    })();

    friend.S2C_FriendListResp = (function() {

        /**
         * Properties of a S2C_FriendListResp.
         * @memberof friend
         * @interface IS2C_FriendListResp
         * @property {number|null} [uid] S2C_FriendListResp uid
         * @property {Array.<friend.IUserInfo>|null} [list] S2C_FriendListResp list
         */

        /**
         * Constructs a new S2C_FriendListResp.
         * @memberof friend
         * @classdesc Represents a S2C_FriendListResp.
         * @implements IS2C_FriendListResp
         * @constructor
         * @param {friend.IS2C_FriendListResp=} [properties] Properties to set
         */
        function S2C_FriendListResp(properties) {
            this.list = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_FriendListResp uid.
         * @member {number} uid
         * @memberof friend.S2C_FriendListResp
         * @instance
         */
        S2C_FriendListResp.prototype.uid = 0;

        /**
         * S2C_FriendListResp list.
         * @member {Array.<friend.IUserInfo>} list
         * @memberof friend.S2C_FriendListResp
         * @instance
         */
        S2C_FriendListResp.prototype.list = $util.emptyArray;

        /**
         * Creates a new S2C_FriendListResp instance using the specified properties.
         * @function create
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {friend.IS2C_FriendListResp=} [properties] Properties to set
         * @returns {friend.S2C_FriendListResp} S2C_FriendListResp instance
         */
        S2C_FriendListResp.create = function create(properties) {
            return new S2C_FriendListResp(properties);
        };

        /**
         * Encodes the specified S2C_FriendListResp message. Does not implicitly {@link friend.S2C_FriendListResp.verify|verify} messages.
         * @function encode
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {friend.IS2C_FriendListResp} message S2C_FriendListResp message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_FriendListResp.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid);
            if (message.list != null && message.list.length)
                for (let i = 0; i < message.list.length; ++i)
                    $root.friend.UserInfo.encode(message.list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_FriendListResp message, length delimited. Does not implicitly {@link friend.S2C_FriendListResp.verify|verify} messages.
         * @function encodeDelimited
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {friend.IS2C_FriendListResp} message S2C_FriendListResp message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_FriendListResp.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_FriendListResp message from the specified reader or buffer.
         * @function decode
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {friend.S2C_FriendListResp} S2C_FriendListResp
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_FriendListResp.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.friend.S2C_FriendListResp();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.int32();
                        break;
                    }
                case 2: {
                        if (!(message.list && message.list.length))
                            message.list = [];
                        message.list.push($root.friend.UserInfo.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_FriendListResp message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {friend.S2C_FriendListResp} S2C_FriendListResp
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_FriendListResp.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_FriendListResp message.
         * @function verify
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_FriendListResp.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isInteger(message.uid))
                    return "uid: integer expected";
            if (message.list != null && message.hasOwnProperty("list")) {
                if (!Array.isArray(message.list))
                    return "list: array expected";
                for (let i = 0; i < message.list.length; ++i) {
                    let error = $root.friend.UserInfo.verify(message.list[i]);
                    if (error)
                        return "list." + error;
                }
            }
            return null;
        };

        /**
         * Creates a S2C_FriendListResp message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {friend.S2C_FriendListResp} S2C_FriendListResp
         */
        S2C_FriendListResp.fromObject = function fromObject(object) {
            if (object instanceof $root.friend.S2C_FriendListResp)
                return object;
            let message = new $root.friend.S2C_FriendListResp();
            if (object.uid != null)
                message.uid = object.uid | 0;
            if (object.list) {
                if (!Array.isArray(object.list))
                    throw TypeError(".friend.S2C_FriendListResp.list: array expected");
                message.list = [];
                for (let i = 0; i < object.list.length; ++i) {
                    if (typeof object.list[i] !== "object")
                        throw TypeError(".friend.S2C_FriendListResp.list: object expected");
                    message.list[i] = $root.friend.UserInfo.fromObject(object.list[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_FriendListResp message. Also converts values to other types if specified.
         * @function toObject
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {friend.S2C_FriendListResp} message S2C_FriendListResp
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_FriendListResp.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.list = [];
            if (options.defaults)
                object.uid = 0;
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.list && message.list.length) {
                object.list = [];
                for (let j = 0; j < message.list.length; ++j)
                    object.list[j] = $root.friend.UserInfo.toObject(message.list[j], options);
            }
            return object;
        };

        /**
         * Converts this S2C_FriendListResp to JSON.
         * @function toJSON
         * @memberof friend.S2C_FriendListResp
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_FriendListResp.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for S2C_FriendListResp
         * @function getTypeUrl
         * @memberof friend.S2C_FriendListResp
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        S2C_FriendListResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/friend.S2C_FriendListResp";
        };

        return S2C_FriendListResp;
    })();

    return friend;
})();

export const move = $root.move = (() => {

    /**
     * Namespace move.
     * @exports move
     * @namespace
     */
    const move = {};

    move.C2S_SyncPosition = (function() {

        /**
         * Properties of a C2S_SyncPosition.
         * @memberof move
         * @interface IC2S_SyncPosition
         * @property {number|null} [x] C2S_SyncPosition x
         * @property {number|null} [y] C2S_SyncPosition y
         * @property {string|null} [str] C2S_SyncPosition str
         */

        /**
         * Constructs a new C2S_SyncPosition.
         * @memberof move
         * @classdesc Represents a C2S_SyncPosition.
         * @implements IC2S_SyncPosition
         * @constructor
         * @param {move.IC2S_SyncPosition=} [properties] Properties to set
         */
        function C2S_SyncPosition(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * C2S_SyncPosition x.
         * @member {number} x
         * @memberof move.C2S_SyncPosition
         * @instance
         */
        C2S_SyncPosition.prototype.x = 0;

        /**
         * C2S_SyncPosition y.
         * @member {number} y
         * @memberof move.C2S_SyncPosition
         * @instance
         */
        C2S_SyncPosition.prototype.y = 0;

        /**
         * C2S_SyncPosition str.
         * @member {string} str
         * @memberof move.C2S_SyncPosition
         * @instance
         */
        C2S_SyncPosition.prototype.str = "";

        /**
         * Creates a new C2S_SyncPosition instance using the specified properties.
         * @function create
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {move.IC2S_SyncPosition=} [properties] Properties to set
         * @returns {move.C2S_SyncPosition} C2S_SyncPosition instance
         */
        C2S_SyncPosition.create = function create(properties) {
            return new C2S_SyncPosition(properties);
        };

        /**
         * Encodes the specified C2S_SyncPosition message. Does not implicitly {@link move.C2S_SyncPosition.verify|verify} messages.
         * @function encode
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {move.IC2S_SyncPosition} message C2S_SyncPosition message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_SyncPosition.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
            if (message.str != null && Object.hasOwnProperty.call(message, "str"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.str);
            return writer;
        };

        /**
         * Encodes the specified C2S_SyncPosition message, length delimited. Does not implicitly {@link move.C2S_SyncPosition.verify|verify} messages.
         * @function encodeDelimited
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {move.IC2S_SyncPosition} message C2S_SyncPosition message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_SyncPosition.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_SyncPosition message from the specified reader or buffer.
         * @function decode
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {move.C2S_SyncPosition} C2S_SyncPosition
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_SyncPosition.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.move.C2S_SyncPosition();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.x = reader.int32();
                        break;
                    }
                case 2: {
                        message.y = reader.int32();
                        break;
                    }
                case 3: {
                        message.str = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_SyncPosition message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {move.C2S_SyncPosition} C2S_SyncPosition
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_SyncPosition.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_SyncPosition message.
         * @function verify
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_SyncPosition.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (!$util.isInteger(message.x))
                    return "x: integer expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (!$util.isInteger(message.y))
                    return "y: integer expected";
            if (message.str != null && message.hasOwnProperty("str"))
                if (!$util.isString(message.str))
                    return "str: string expected";
            return null;
        };

        /**
         * Creates a C2S_SyncPosition message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {move.C2S_SyncPosition} C2S_SyncPosition
         */
        C2S_SyncPosition.fromObject = function fromObject(object) {
            if (object instanceof $root.move.C2S_SyncPosition)
                return object;
            let message = new $root.move.C2S_SyncPosition();
            if (object.x != null)
                message.x = object.x | 0;
            if (object.y != null)
                message.y = object.y | 0;
            if (object.str != null)
                message.str = String(object.str);
            return message;
        };

        /**
         * Creates a plain object from a C2S_SyncPosition message. Also converts values to other types if specified.
         * @function toObject
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {move.C2S_SyncPosition} message C2S_SyncPosition
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_SyncPosition.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.x = 0;
                object.y = 0;
                object.str = "";
            }
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = message.y;
            if (message.str != null && message.hasOwnProperty("str"))
                object.str = message.str;
            return object;
        };

        /**
         * Converts this C2S_SyncPosition to JSON.
         * @function toJSON
         * @memberof move.C2S_SyncPosition
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_SyncPosition.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for C2S_SyncPosition
         * @function getTypeUrl
         * @memberof move.C2S_SyncPosition
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        C2S_SyncPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/move.C2S_SyncPosition";
        };

        return C2S_SyncPosition;
    })();

    move.S2C_SyncPosition = (function() {

        /**
         * Properties of a S2C_SyncPosition.
         * @memberof move
         * @interface IS2C_SyncPosition
         * @property {number|null} [x] S2C_SyncPosition x
         * @property {number|null} [y] S2C_SyncPosition y
         * @property {string|null} [str] S2C_SyncPosition str
         */

        /**
         * Constructs a new S2C_SyncPosition.
         * @memberof move
         * @classdesc Represents a S2C_SyncPosition.
         * @implements IS2C_SyncPosition
         * @constructor
         * @param {move.IS2C_SyncPosition=} [properties] Properties to set
         */
        function S2C_SyncPosition(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_SyncPosition x.
         * @member {number} x
         * @memberof move.S2C_SyncPosition
         * @instance
         */
        S2C_SyncPosition.prototype.x = 0;

        /**
         * S2C_SyncPosition y.
         * @member {number} y
         * @memberof move.S2C_SyncPosition
         * @instance
         */
        S2C_SyncPosition.prototype.y = 0;

        /**
         * S2C_SyncPosition str.
         * @member {string} str
         * @memberof move.S2C_SyncPosition
         * @instance
         */
        S2C_SyncPosition.prototype.str = "";

        /**
         * Creates a new S2C_SyncPosition instance using the specified properties.
         * @function create
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {move.IS2C_SyncPosition=} [properties] Properties to set
         * @returns {move.S2C_SyncPosition} S2C_SyncPosition instance
         */
        S2C_SyncPosition.create = function create(properties) {
            return new S2C_SyncPosition(properties);
        };

        /**
         * Encodes the specified S2C_SyncPosition message. Does not implicitly {@link move.S2C_SyncPosition.verify|verify} messages.
         * @function encode
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {move.IS2C_SyncPosition} message S2C_SyncPosition message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_SyncPosition.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
            if (message.str != null && Object.hasOwnProperty.call(message, "str"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.str);
            return writer;
        };

        /**
         * Encodes the specified S2C_SyncPosition message, length delimited. Does not implicitly {@link move.S2C_SyncPosition.verify|verify} messages.
         * @function encodeDelimited
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {move.IS2C_SyncPosition} message S2C_SyncPosition message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_SyncPosition.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_SyncPosition message from the specified reader or buffer.
         * @function decode
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {move.S2C_SyncPosition} S2C_SyncPosition
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_SyncPosition.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.move.S2C_SyncPosition();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.x = reader.int32();
                        break;
                    }
                case 2: {
                        message.y = reader.int32();
                        break;
                    }
                case 3: {
                        message.str = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_SyncPosition message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {move.S2C_SyncPosition} S2C_SyncPosition
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_SyncPosition.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_SyncPosition message.
         * @function verify
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_SyncPosition.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (!$util.isInteger(message.x))
                    return "x: integer expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (!$util.isInteger(message.y))
                    return "y: integer expected";
            if (message.str != null && message.hasOwnProperty("str"))
                if (!$util.isString(message.str))
                    return "str: string expected";
            return null;
        };

        /**
         * Creates a S2C_SyncPosition message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {move.S2C_SyncPosition} S2C_SyncPosition
         */
        S2C_SyncPosition.fromObject = function fromObject(object) {
            if (object instanceof $root.move.S2C_SyncPosition)
                return object;
            let message = new $root.move.S2C_SyncPosition();
            if (object.x != null)
                message.x = object.x | 0;
            if (object.y != null)
                message.y = object.y | 0;
            if (object.str != null)
                message.str = String(object.str);
            return message;
        };

        /**
         * Creates a plain object from a S2C_SyncPosition message. Also converts values to other types if specified.
         * @function toObject
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {move.S2C_SyncPosition} message S2C_SyncPosition
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_SyncPosition.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.x = 0;
                object.y = 0;
                object.str = "";
            }
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = message.y;
            if (message.str != null && message.hasOwnProperty("str"))
                object.str = message.str;
            return object;
        };

        /**
         * Converts this S2C_SyncPosition to JSON.
         * @function toJSON
         * @memberof move.S2C_SyncPosition
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_SyncPosition.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for S2C_SyncPosition
         * @function getTypeUrl
         * @memberof move.S2C_SyncPosition
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        S2C_SyncPosition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/move.S2C_SyncPosition";
        };

        return S2C_SyncPosition;
    })();

    return move;
})();

export const user = $root.user = (() => {

    /**
     * Namespace user.
     * @exports user
     * @namespace
     */
    const user = {};

    user.C2S_Login = (function() {

        /**
         * Properties of a C2S_Login.
         * @memberof user
         * @interface IC2S_Login
         */

        /**
         * Constructs a new C2S_Login.
         * @memberof user
         * @classdesc Represents a C2S_Login.
         * @implements IC2S_Login
         * @constructor
         * @param {user.IC2S_Login=} [properties] Properties to set
         */
        function C2S_Login(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Creates a new C2S_Login instance using the specified properties.
         * @function create
         * @memberof user.C2S_Login
         * @static
         * @param {user.IC2S_Login=} [properties] Properties to set
         * @returns {user.C2S_Login} C2S_Login instance
         */
        C2S_Login.create = function create(properties) {
            return new C2S_Login(properties);
        };

        /**
         * Encodes the specified C2S_Login message. Does not implicitly {@link user.C2S_Login.verify|verify} messages.
         * @function encode
         * @memberof user.C2S_Login
         * @static
         * @param {user.IC2S_Login} message C2S_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_Login.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            return writer;
        };

        /**
         * Encodes the specified C2S_Login message, length delimited. Does not implicitly {@link user.C2S_Login.verify|verify} messages.
         * @function encodeDelimited
         * @memberof user.C2S_Login
         * @static
         * @param {user.IC2S_Login} message C2S_Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        C2S_Login.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a C2S_Login message from the specified reader or buffer.
         * @function decode
         * @memberof user.C2S_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {user.C2S_Login} C2S_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_Login.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.user.C2S_Login();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a C2S_Login message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof user.C2S_Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {user.C2S_Login} C2S_Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        C2S_Login.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a C2S_Login message.
         * @function verify
         * @memberof user.C2S_Login
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        C2S_Login.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            return null;
        };

        /**
         * Creates a C2S_Login message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof user.C2S_Login
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {user.C2S_Login} C2S_Login
         */
        C2S_Login.fromObject = function fromObject(object) {
            if (object instanceof $root.user.C2S_Login)
                return object;
            return new $root.user.C2S_Login();
        };

        /**
         * Creates a plain object from a C2S_Login message. Also converts values to other types if specified.
         * @function toObject
         * @memberof user.C2S_Login
         * @static
         * @param {user.C2S_Login} message C2S_Login
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        C2S_Login.toObject = function toObject() {
            return {};
        };

        /**
         * Converts this C2S_Login to JSON.
         * @function toJSON
         * @memberof user.C2S_Login
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        C2S_Login.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for C2S_Login
         * @function getTypeUrl
         * @memberof user.C2S_Login
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        C2S_Login.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/user.C2S_Login";
        };

        return C2S_Login;
    })();

    user.Player = (function() {

        /**
         * Properties of a Player.
         * @memberof user
         * @interface IPlayer
         * @property {string|null} [id] Player id
         * @property {number|null} [x] Player x
         * @property {number|null} [y] Player y
         */

        /**
         * Constructs a new Player.
         * @memberof user
         * @classdesc Represents a Player.
         * @implements IPlayer
         * @constructor
         * @param {user.IPlayer=} [properties] Properties to set
         */
        function Player(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Player id.
         * @member {string} id
         * @memberof user.Player
         * @instance
         */
        Player.prototype.id = "";

        /**
         * Player x.
         * @member {number} x
         * @memberof user.Player
         * @instance
         */
        Player.prototype.x = 0;

        /**
         * Player y.
         * @member {number} y
         * @memberof user.Player
         * @instance
         */
        Player.prototype.y = 0;

        /**
         * Creates a new Player instance using the specified properties.
         * @function create
         * @memberof user.Player
         * @static
         * @param {user.IPlayer=} [properties] Properties to set
         * @returns {user.Player} Player instance
         */
        Player.create = function create(properties) {
            return new Player(properties);
        };

        /**
         * Encodes the specified Player message. Does not implicitly {@link user.Player.verify|verify} messages.
         * @function encode
         * @memberof user.Player
         * @static
         * @param {user.IPlayer} message Player message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Player.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.y);
            return writer;
        };

        /**
         * Encodes the specified Player message, length delimited. Does not implicitly {@link user.Player.verify|verify} messages.
         * @function encodeDelimited
         * @memberof user.Player
         * @static
         * @param {user.IPlayer} message Player message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Player.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Player message from the specified reader or buffer.
         * @function decode
         * @memberof user.Player
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {user.Player} Player
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Player.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.user.Player();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.id = reader.string();
                        break;
                    }
                case 2: {
                        message.x = reader.int32();
                        break;
                    }
                case 3: {
                        message.y = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Player message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof user.Player
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {user.Player} Player
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Player.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Player message.
         * @function verify
         * @memberof user.Player
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Player.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (!$util.isInteger(message.x))
                    return "x: integer expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (!$util.isInteger(message.y))
                    return "y: integer expected";
            return null;
        };

        /**
         * Creates a Player message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof user.Player
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {user.Player} Player
         */
        Player.fromObject = function fromObject(object) {
            if (object instanceof $root.user.Player)
                return object;
            let message = new $root.user.Player();
            if (object.id != null)
                message.id = String(object.id);
            if (object.x != null)
                message.x = object.x | 0;
            if (object.y != null)
                message.y = object.y | 0;
            return message;
        };

        /**
         * Creates a plain object from a Player message. Also converts values to other types if specified.
         * @function toObject
         * @memberof user.Player
         * @static
         * @param {user.Player} message Player
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Player.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.id = "";
                object.x = 0;
                object.y = 0;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = message.y;
            return object;
        };

        /**
         * Converts this Player to JSON.
         * @function toJSON
         * @memberof user.Player
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Player.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Player
         * @function getTypeUrl
         * @memberof user.Player
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Player.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/user.Player";
        };

        return Player;
    })();

    user.S2C_LoginResp = (function() {

        /**
         * Properties of a S2C_LoginResp.
         * @memberof user
         * @interface IS2C_LoginResp
         * @property {user.IPlayer|null} [own] S2C_LoginResp own
         * @property {Array.<user.IPlayer>|null} [others] S2C_LoginResp others
         */

        /**
         * Constructs a new S2C_LoginResp.
         * @memberof user
         * @classdesc Represents a S2C_LoginResp.
         * @implements IS2C_LoginResp
         * @constructor
         * @param {user.IS2C_LoginResp=} [properties] Properties to set
         */
        function S2C_LoginResp(properties) {
            this.others = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_LoginResp own.
         * @member {user.IPlayer|null|undefined} own
         * @memberof user.S2C_LoginResp
         * @instance
         */
        S2C_LoginResp.prototype.own = null;

        /**
         * S2C_LoginResp others.
         * @member {Array.<user.IPlayer>} others
         * @memberof user.S2C_LoginResp
         * @instance
         */
        S2C_LoginResp.prototype.others = $util.emptyArray;

        /**
         * Creates a new S2C_LoginResp instance using the specified properties.
         * @function create
         * @memberof user.S2C_LoginResp
         * @static
         * @param {user.IS2C_LoginResp=} [properties] Properties to set
         * @returns {user.S2C_LoginResp} S2C_LoginResp instance
         */
        S2C_LoginResp.create = function create(properties) {
            return new S2C_LoginResp(properties);
        };

        /**
         * Encodes the specified S2C_LoginResp message. Does not implicitly {@link user.S2C_LoginResp.verify|verify} messages.
         * @function encode
         * @memberof user.S2C_LoginResp
         * @static
         * @param {user.IS2C_LoginResp} message S2C_LoginResp message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_LoginResp.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.own != null && Object.hasOwnProperty.call(message, "own"))
                $root.user.Player.encode(message.own, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.others != null && message.others.length)
                for (let i = 0; i < message.others.length; ++i)
                    $root.user.Player.encode(message.others[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_LoginResp message, length delimited. Does not implicitly {@link user.S2C_LoginResp.verify|verify} messages.
         * @function encodeDelimited
         * @memberof user.S2C_LoginResp
         * @static
         * @param {user.IS2C_LoginResp} message S2C_LoginResp message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_LoginResp.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_LoginResp message from the specified reader or buffer.
         * @function decode
         * @memberof user.S2C_LoginResp
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {user.S2C_LoginResp} S2C_LoginResp
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_LoginResp.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.user.S2C_LoginResp();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.own = $root.user.Player.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        if (!(message.others && message.others.length))
                            message.others = [];
                        message.others.push($root.user.Player.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_LoginResp message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof user.S2C_LoginResp
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {user.S2C_LoginResp} S2C_LoginResp
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_LoginResp.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_LoginResp message.
         * @function verify
         * @memberof user.S2C_LoginResp
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_LoginResp.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.own != null && message.hasOwnProperty("own")) {
                let error = $root.user.Player.verify(message.own);
                if (error)
                    return "own." + error;
            }
            if (message.others != null && message.hasOwnProperty("others")) {
                if (!Array.isArray(message.others))
                    return "others: array expected";
                for (let i = 0; i < message.others.length; ++i) {
                    let error = $root.user.Player.verify(message.others[i]);
                    if (error)
                        return "others." + error;
                }
            }
            return null;
        };

        /**
         * Creates a S2C_LoginResp message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof user.S2C_LoginResp
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {user.S2C_LoginResp} S2C_LoginResp
         */
        S2C_LoginResp.fromObject = function fromObject(object) {
            if (object instanceof $root.user.S2C_LoginResp)
                return object;
            let message = new $root.user.S2C_LoginResp();
            if (object.own != null) {
                if (typeof object.own !== "object")
                    throw TypeError(".user.S2C_LoginResp.own: object expected");
                message.own = $root.user.Player.fromObject(object.own);
            }
            if (object.others) {
                if (!Array.isArray(object.others))
                    throw TypeError(".user.S2C_LoginResp.others: array expected");
                message.others = [];
                for (let i = 0; i < object.others.length; ++i) {
                    if (typeof object.others[i] !== "object")
                        throw TypeError(".user.S2C_LoginResp.others: object expected");
                    message.others[i] = $root.user.Player.fromObject(object.others[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_LoginResp message. Also converts values to other types if specified.
         * @function toObject
         * @memberof user.S2C_LoginResp
         * @static
         * @param {user.S2C_LoginResp} message S2C_LoginResp
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_LoginResp.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.others = [];
            if (options.defaults)
                object.own = null;
            if (message.own != null && message.hasOwnProperty("own"))
                object.own = $root.user.Player.toObject(message.own, options);
            if (message.others && message.others.length) {
                object.others = [];
                for (let j = 0; j < message.others.length; ++j)
                    object.others[j] = $root.user.Player.toObject(message.others[j], options);
            }
            return object;
        };

        /**
         * Converts this S2C_LoginResp to JSON.
         * @function toJSON
         * @memberof user.S2C_LoginResp
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_LoginResp.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for S2C_LoginResp
         * @function getTypeUrl
         * @memberof user.S2C_LoginResp
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        S2C_LoginResp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/user.S2C_LoginResp";
        };

        return S2C_LoginResp;
    })();

    user.S2C_AddPlayer = (function() {

        /**
         * Properties of a S2C_AddPlayer.
         * @memberof user
         * @interface IS2C_AddPlayer
         * @property {user.IPlayer|null} [newPlayer] S2C_AddPlayer newPlayer
         */

        /**
         * Constructs a new S2C_AddPlayer.
         * @memberof user
         * @classdesc Represents a S2C_AddPlayer.
         * @implements IS2C_AddPlayer
         * @constructor
         * @param {user.IS2C_AddPlayer=} [properties] Properties to set
         */
        function S2C_AddPlayer(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * S2C_AddPlayer newPlayer.
         * @member {user.IPlayer|null|undefined} newPlayer
         * @memberof user.S2C_AddPlayer
         * @instance
         */
        S2C_AddPlayer.prototype.newPlayer = null;

        /**
         * Creates a new S2C_AddPlayer instance using the specified properties.
         * @function create
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {user.IS2C_AddPlayer=} [properties] Properties to set
         * @returns {user.S2C_AddPlayer} S2C_AddPlayer instance
         */
        S2C_AddPlayer.create = function create(properties) {
            return new S2C_AddPlayer(properties);
        };

        /**
         * Encodes the specified S2C_AddPlayer message. Does not implicitly {@link user.S2C_AddPlayer.verify|verify} messages.
         * @function encode
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {user.IS2C_AddPlayer} message S2C_AddPlayer message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_AddPlayer.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.newPlayer != null && Object.hasOwnProperty.call(message, "newPlayer"))
                $root.user.Player.encode(message.newPlayer, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified S2C_AddPlayer message, length delimited. Does not implicitly {@link user.S2C_AddPlayer.verify|verify} messages.
         * @function encodeDelimited
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {user.IS2C_AddPlayer} message S2C_AddPlayer message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        S2C_AddPlayer.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a S2C_AddPlayer message from the specified reader or buffer.
         * @function decode
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {user.S2C_AddPlayer} S2C_AddPlayer
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_AddPlayer.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.user.S2C_AddPlayer();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.newPlayer = $root.user.Player.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a S2C_AddPlayer message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {user.S2C_AddPlayer} S2C_AddPlayer
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        S2C_AddPlayer.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a S2C_AddPlayer message.
         * @function verify
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        S2C_AddPlayer.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.newPlayer != null && message.hasOwnProperty("newPlayer")) {
                let error = $root.user.Player.verify(message.newPlayer);
                if (error)
                    return "newPlayer." + error;
            }
            return null;
        };

        /**
         * Creates a S2C_AddPlayer message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {user.S2C_AddPlayer} S2C_AddPlayer
         */
        S2C_AddPlayer.fromObject = function fromObject(object) {
            if (object instanceof $root.user.S2C_AddPlayer)
                return object;
            let message = new $root.user.S2C_AddPlayer();
            if (object.newPlayer != null) {
                if (typeof object.newPlayer !== "object")
                    throw TypeError(".user.S2C_AddPlayer.newPlayer: object expected");
                message.newPlayer = $root.user.Player.fromObject(object.newPlayer);
            }
            return message;
        };

        /**
         * Creates a plain object from a S2C_AddPlayer message. Also converts values to other types if specified.
         * @function toObject
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {user.S2C_AddPlayer} message S2C_AddPlayer
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        S2C_AddPlayer.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults)
                object.newPlayer = null;
            if (message.newPlayer != null && message.hasOwnProperty("newPlayer"))
                object.newPlayer = $root.user.Player.toObject(message.newPlayer, options);
            return object;
        };

        /**
         * Converts this S2C_AddPlayer to JSON.
         * @function toJSON
         * @memberof user.S2C_AddPlayer
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        S2C_AddPlayer.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for S2C_AddPlayer
         * @function getTypeUrl
         * @memberof user.S2C_AddPlayer
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        S2C_AddPlayer.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/user.S2C_AddPlayer";
        };

        return S2C_AddPlayer;
    })();

    return user;
})();

export { $root as default };
